VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form frmACR100 
   BackColor       =   &H00800000&
   Caption         =   "frmACR100"
   ClientHeight    =   7650
   ClientLeft      =   540
   ClientTop       =   720
   ClientWidth     =   10905
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   ScaleHeight     =   7650
   ScaleWidth      =   10905
   Begin MSAdodcLib.Adodc Adodc6 
      Height          =   345
      Left            =   4350
      Top             =   0
      Visible         =   0   'False
      Width           =   2265
      _ExtentX        =   3995
      _ExtentY        =   609
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "6. RCT"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc5 
      Height          =   330
      Left            =   6165
      Top             =   30
      Visible         =   0   'False
      Width           =   1905
      _ExtentX        =   3360
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "5.APT"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc4 
      Height          =   330
      Left            =   8685
      Top             =   1125
      Visible         =   0   'False
      Width           =   1845
      _ExtentX        =   3254
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "4.VVT"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc3 
      Height          =   345
      Left            =   8655
      Top             =   720
      Visible         =   0   'False
      Width           =   1890
      _ExtentX        =   3334
      _ExtentY        =   609
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "3.SMM"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   345
      Left            =   8640
      Top             =   375
      Visible         =   0   'False
      Width           =   1845
      _ExtentX        =   3254
      _ExtentY        =   609
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "2.ACN"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   8595
      Top             =   0
      Visible         =   0   'False
      Width           =   1890
      _ExtentX        =   3334
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "1.RCM"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame frameACR100 
      BackColor       =   &H00E0E0E0&
      BorderStyle     =   0  'None
      Height          =   5325
      Left            =   135
      TabIndex        =   10
      Top             =   1485
      Width           =   10635
      Begin MSDataListLib.DataCombo cboCMTYP 
         Bindings        =   "frmACR100.frx":0000
         Height          =   360
         Left            =   1425
         TabIndex        =   76
         Top             =   525
         Visible         =   0   'False
         Width           =   3255
         _ExtentX        =   5741
         _ExtentY        =   635
         _Version        =   393216
         ListField       =   "CTDSC"
         BoundColumn     =   "CTTYP"
         Text            =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin VB.TextBox txtCTDSC 
         BeginProperty Font 
            Name            =   "VNI-Times"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   2430
         TabIndex        =   75
         Top             =   540
         Width           =   2250
      End
      Begin VB.TextBox txtCMTYP 
         Height          =   285
         Left            =   1455
         TabIndex        =   74
         Top             =   540
         Width           =   900
      End
      Begin MSDataListLib.DataCombo cboCMPTC 
         Bindings        =   "frmACR100.frx":0015
         Height          =   360
         Left            =   7050
         TabIndex        =   72
         Top             =   3090
         Visible         =   0   'False
         Width           =   3345
         _ExtentX        =   5900
         _ExtentY        =   635
         _Version        =   393216
         ListField       =   "PTDSC"
         BoundColumn     =   "PTPTC"
         Text            =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin VB.TextBox txtPTDSC 
         BeginProperty Font 
            Name            =   "VNI-Times"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   8295
         TabIndex        =   71
         Top             =   3135
         Width           =   2070
      End
      Begin MSDataListLib.DataCombo cboCMVAT 
         Bindings        =   "frmACR100.frx":002A
         Height          =   315
         Left            =   4800
         TabIndex        =   70
         Top             =   2670
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   556
         _Version        =   393216
         ListField       =   "VTDSC"
         BoundColumn     =   "VTVTP"
         Text            =   ""
      End
      Begin VB.TextBox txtVTDSC 
         Height          =   288
         Left            =   5460
         TabIndex        =   69
         Top             =   2685
         Width           =   885
      End
      Begin VB.TextBox txtCMVAT 
         Height          =   288
         Left            =   4800
         TabIndex        =   68
         Top             =   2685
         Width           =   555
      End
      Begin VB.TextBox txtCMDLP 
         Enabled         =   0   'False
         Height          =   288
         Left            =   9435
         Locked          =   -1  'True
         TabIndex        =   65
         Top             =   4245
         Width           =   1035
      End
      Begin VB.TextBox txtCMDLI 
         Enabled         =   0   'False
         Height          =   288
         Left            =   9405
         Locked          =   -1  'True
         TabIndex        =   63
         Top             =   4890
         Width           =   1065
      End
      Begin VB.TextBox txtCMYSA 
         Enabled         =   0   'False
         Height          =   288
         Left            =   7095
         Locked          =   -1  'True
         TabIndex        =   61
         Top             =   4260
         Width           =   855
      End
      Begin VB.TextBox txtCMYPA 
         Enabled         =   0   'False
         Height          =   288
         Left            =   7080
         Locked          =   -1  'True
         TabIndex        =   59
         Top             =   4890
         Width           =   885
      End
      Begin VB.TextBox txtCMAIA 
         Enabled         =   0   'False
         Height          =   288
         Left            =   4080
         Locked          =   -1  'True
         TabIndex        =   57
         Top             =   4260
         Width           =   1080
      End
      Begin VB.TextBox txtCMAPA 
         Enabled         =   0   'False
         Height          =   288
         Left            =   4110
         Locked          =   -1  'True
         TabIndex        =   55
         Top             =   4905
         Width           =   1080
      End
      Begin VB.TextBox txtCMARB 
         Enabled         =   0   'False
         Height          =   288
         Left            =   1425
         Locked          =   -1  'True
         TabIndex        =   53
         Top             =   4260
         Width           =   900
      End
      Begin VB.TextBox txtCMSTN 
         Height          =   300
         Left            =   1425
         TabIndex        =   49
         Top             =   3585
         Width           =   1515
      End
      Begin VB.TextBox txtCMOEM 
         Enabled         =   0   'False
         Height          =   288
         Left            =   1425
         Locked          =   -1  'True
         TabIndex        =   48
         Top             =   4830
         Width           =   900
      End
      Begin VB.CheckBox chkCMCRS 
         Height          =   210
         Left            =   4770
         TabIndex        =   47
         Top             =   3225
         Width           =   225
      End
      Begin VB.TextBox txtCMPTC 
         Height          =   288
         Left            =   7050
         TabIndex        =   46
         Top             =   3150
         Width           =   1230
      End
      Begin VB.TextBox txtCMCLM 
         Height          =   300
         Left            =   1425
         TabIndex        =   42
         Top             =   3210
         Width           =   1515
      End
      Begin VB.TextBox txtCMVID 
         Height          =   288
         Left            =   9195
         TabIndex        =   41
         Top             =   2265
         Width           =   1245
      End
      Begin MSDataListLib.DataCombo cboCMSNO 
         Bindings        =   "frmACR100.frx":003F
         Height          =   360
         Left            =   7050
         TabIndex        =   40
         Top             =   3570
         Visible         =   0   'False
         Width           =   3360
         _ExtentX        =   5927
         _ExtentY        =   635
         _Version        =   393216
         ListField       =   "MMNME"
         BoundColumn     =   "MMSNO"
         Text            =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin VB.TextBox txtMMNME 
         BeginProperty Font 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   7950
         TabIndex        =   39
         Top             =   3570
         Width           =   2460
      End
      Begin VB.TextBox txtCMSNO 
         BeginProperty Font 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   7080
         TabIndex        =   38
         Top             =   3570
         Width           =   810
      End
      Begin VB.TextBox txtCMGCD 
         Height          =   300
         Left            =   1425
         TabIndex        =   37
         Top             =   2730
         Width           =   1515
      End
      Begin VB.TextBox txtCMFAX 
         Height          =   288
         Left            =   4785
         TabIndex        =   34
         Top             =   2295
         Width           =   1515
      End
      Begin VB.TextBox txtCMTEL 
         Height          =   300
         Left            =   1425
         TabIndex        =   33
         Top             =   2310
         Width           =   1515
      End
      Begin MSDataListLib.DataCombo cboCMCID 
         Bindings        =   "frmACR100.frx":0054
         Height          =   390
         Left            =   7065
         TabIndex        =   32
         Top             =   75
         Visible         =   0   'False
         Width           =   3345
         _ExtentX        =   5900
         _ExtentY        =   688
         _Version        =   393216
         ListField       =   "CNONM"
         BoundColumn     =   "CNCID"
         Text            =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "VNI-Helve"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin VB.TextBox txtCMCID 
         BeginProperty Font 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   7065
         TabIndex        =   31
         Top             =   90
         Width           =   720
      End
      Begin VB.TextBox txtCNONM 
         BeginProperty Font 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   7905
         TabIndex        =   30
         Top             =   90
         Width           =   2520
      End
      Begin VB.TextBox txtCMPSC 
         Height          =   288
         Left            =   9210
         TabIndex        =   28
         Top             =   1845
         Width           =   1245
      End
      Begin VB.TextBox txtCMCIT 
         Height          =   288
         Left            =   4770
         TabIndex        =   27
         Top             =   1830
         Width           =   1545
      End
      Begin VB.TextBox txtCMCNT 
         Height          =   288
         Left            =   1425
         TabIndex        =   26
         Top             =   1875
         Width           =   1515
      End
      Begin VB.TextBox txtCMAD2 
         BeginProperty Font 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   7080
         TabIndex        =   25
         Top             =   1380
         Width           =   3360
      End
      Begin VB.TextBox txtCMAD1 
         BeginProperty Font 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   1425
         TabIndex        =   24
         Top             =   1455
         Width           =   3225
      End
      Begin VB.TextBox txtCMCTN 
         BeginProperty Font 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   7080
         TabIndex        =   23
         Top             =   930
         Width           =   3345
      End
      Begin VB.TextBox txtCMNME 
         BeginProperty Font 
            Name            =   "VNI-Helve"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   288
         Left            =   1440
         TabIndex        =   22
         Top             =   975
         Width           =   3225
      End
      Begin VB.TextBox txtCMCNO 
         Height          =   288
         Left            =   1440
         TabIndex        =   21
         Top             =   120
         Width           =   1455
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Custmer Type"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   225
         Index           =   30
         Left            =   180
         TabIndex        =   73
         Top             =   585
         Width           =   1200
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Address 2"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   225
         Index           =   29
         Left            =   6045
         TabIndex        =   67
         Top             =   1440
         Width           =   945
      End
      Begin VB.Line Line2 
         X1              =   15
         X2              =   10635
         Y1              =   4020
         Y2              =   4020
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Last Sales Date "
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   360
         Index           =   28
         Left            =   8250
         TabIndex        =   66
         Top             =   4860
         Width           =   1050
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Last Paid Date"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   390
         Index           =   27
         Left            =   8355
         TabIndex        =   64
         Top             =   4260
         Width           =   960
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Y-T-D Payment amount"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   390
         Index           =   26
         Left            =   5535
         TabIndex        =   62
         Top             =   4830
         Width           =   1440
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Y-T-D Sales amount"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   450
         Index           =   25
         Left            =   5805
         TabIndex        =   60
         Top             =   4215
         Width           =   1140
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Average Payment amount"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   390
         Index           =   24
         Left            =   2400
         TabIndex        =   58
         Top             =   4815
         Width           =   1710
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Average Invoice amount"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   450
         Index           =   23
         Left            =   2370
         TabIndex        =   56
         Top             =   4215
         Width           =   1665
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Opened Orders amount"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   390
         Index           =   22
         Left            =   60
         TabIndex        =   54
         Top             =   4725
         Width           =   1305
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "% VAT"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Index           =   21
         Left            =   4005
         TabIndex        =   52
         Top             =   2745
         Width           =   645
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Ship to Number"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   225
         Index           =   20
         Left            =   45
         TabIndex        =   51
         Top             =   3660
         Width           =   1335
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "A/R Balance amount"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   390
         Index           =   19
         Left            =   75
         TabIndex        =   50
         Top             =   4200
         Width           =   1305
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Credit Status"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Index           =   18
         Left            =   3480
         TabIndex        =   45
         Top             =   3210
         Width           =   1185
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Credit Limited amount"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   360
         Index           =   17
         Left            =   165
         TabIndex        =   44
         Top             =   3180
         Width           =   1200
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Payment term code"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Index           =   16
         Left            =   5295
         TabIndex        =   43
         Top             =   3225
         Width           =   1725
      End
      Begin VB.Label lbl 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Group code"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   270
         Index           =   14
         Left            =   75
         TabIndex        =   36
         Top             =   2715
         Width           =   1260
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Saleman"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Index           =   13
         Left            =   6180
         TabIndex        =   35
         Top             =   3615
         Width           =   810
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Of Company"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Index           =   12
         Left            =   5850
         TabIndex        =   29
         Top             =   135
         Width           =   1140
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "VAT ID"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Index           =   11
         Left            =   8415
         TabIndex        =   20
         Top             =   2310
         Width           =   645
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Tel"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   225
         Index           =   10
         Left            =   1095
         TabIndex        =   19
         Top             =   2400
         Width           =   285
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Fax"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Index           =   9
         Left            =   4305
         TabIndex        =   18
         Top             =   2325
         Width           =   390
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Country"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Index           =   8
         Left            =   660
         TabIndex        =   17
         Top             =   1905
         Width           =   720
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Postal code"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Index           =   7
         Left            =   8055
         TabIndex        =   16
         Top             =   1905
         Width           =   1035
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Address 1"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   225
         Index           =   6
         Left            =   480
         TabIndex        =   15
         Top             =   1485
         Width           =   900
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "City"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Index           =   4
         Left            =   4290
         TabIndex        =   14
         Top             =   1875
         Width           =   405
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Contact name"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Index           =   3
         Left            =   5745
         TabIndex        =   13
         Top             =   960
         Width           =   1245
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Custmer No"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   225
         Index           =   2
         Left            =   360
         TabIndex        =   12
         Top             =   165
         Width           =   1020
      End
      Begin VB.Label lbl 
         BackStyle       =   0  'Transparent
         Caption         =   "Company name"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   7.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Index           =   5
         Left            =   15
         TabIndex        =   11
         Top             =   975
         Width           =   1365
      End
   End
   Begin VB.CommandButton cmdAddnew 
      Caption         =   "&New Customer"
      Height          =   450
      Left            =   2010
      TabIndex        =   8
      Top             =   7035
      Width           =   996
   End
   Begin VB.CommandButton cmdEdit 
      Caption         =   "&Edit"
      Height          =   450
      Left            =   3090
      TabIndex        =   7
      Top             =   7050
      Width           =   948
   End
   Begin VB.CommandButton cmdSave 
      Caption         =   "&Save"
      Height          =   450
      Left            =   4095
      TabIndex        =   6
      Top             =   7035
      Width           =   984
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "&Cancel"
      Height          =   450
      Left            =   5160
      TabIndex        =   5
      Top             =   7035
      Width           =   1032
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "&Exit"
      Height          =   450
      Left            =   7275
      TabIndex        =   4
      Top             =   7035
      Width           =   1080
   End
   Begin VB.CommandButton cmdDelete 
      Caption         =   "&Delete"
      Height          =   450
      Left            =   6255
      TabIndex        =   2
      Top             =   7035
      Width           =   960
   End
   Begin MSDataListLib.DataCombo cboCMCNO 
      Bindings        =   "frmACR100.frx":0069
      Height          =   375
      Left            =   4470
      TabIndex        =   3
      Top             =   900
      Width           =   3090
      _ExtentX        =   5450
      _ExtentY        =   661
      _Version        =   393216
      ListField       =   "CMNME"
      BoundColumn     =   "CMCNO"
      Text            =   ""
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "VNI-Times"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Select Customer Review"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   7.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0080FFFF&
      Height          =   225
      Index           =   15
      Left            =   2010
      TabIndex        =   9
      Top             =   945
      Width           =   2265
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "ACR100"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   450
      Index           =   0
      Left            =   120
      TabIndex        =   1
      Top             =   0
      Width           =   1830
   End
   Begin VB.Label lbl 
      BackStyle       =   0  'Transparent
      Caption         =   "Customer Master Maintenance"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   16.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   540
      Index           =   1
      Left            =   2580
      TabIndex        =   0
      Top             =   285
      Width           =   5955
   End
End
Attribute VB_Name = "frmACR100"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim OldCMCNO As String
Private Sub cboCMCID_Click(Area As Integer)
If Area = 2 Then
    txtCMCID = cboCMCID.BoundText
    txtCNONM = cboCMCID.Text
    cboCMCID.Visible = False
    txtCMTYP.SetFocus
End If
End Sub

Private Sub cboCMCNO_Click(Area As Integer)
If Area = 2 Then
    ISEDITING = False
    WriteToScreen
    ButtonStatus
End If
End Sub

Private Sub cboCMPTC_Click(Area As Integer)
If Area = 2 Then
    txtCMPTC = cboCMPTC.BoundText
    txtPTDSC = cboCMPTC.Text
    cboCMPTC.Visible = False
    txtCMSTN.SetFocus
End If
End Sub

Private Sub cboCMSNO_Click(Area As Integer)
If Area = 2 Then
    txtCMSNO = cboCMSNO.BoundText
    txtMMNME = cboCMSNO.Text
    cboCMSNO.Visible = False
End If
End Sub

Private Sub cboCMTYP_Click(Area As Integer)
If Area = 2 Then
    txtCMTYP = cboCMTYP.BoundText
    txtCTDSC = cboCMTYP.Text
    cboCMTYP.Visible = False
    txtCMNME.SetFocus
End If
End Sub

Private Sub cboCMVAT_Click(Area As Integer)
If Area = 2 Then
    txtCMVAT = cboCMVAT.BoundText
    txtVTDSC = cboCMVAT.Text
    cboCMVAT.Visible = False
    txtCMCLM.SetFocus
End If
End Sub

Private Sub chkCMCRS_Click()
'txtCMPTC.SetFocus
End Sub

Private Sub cmdAddnew_Click()
ISADDING = True
ISEDITING = True
WriteToScreen
ButtonStatus
End Sub

Private Sub cmdCancel_Click()
ISADDING = False
ISEDITING = False
ButtonStatus
End Sub

Private Sub cmdDelete_Click()
Response = MsgBox("Are you sure to delete this customer?", vbYesNo + vbCritical + vbDefaultButton2, "Chu y'")
If Response = vbYes Then
    DBconn.Execute ("DELETE FROM RCM where CMCNO='" & cboCMCNO.BoundText & "'")
End If

End Sub

Private Sub cmdEdit_Click()
ISEDITING = True
WriteToScreen
ButtonStatus
End Sub

Private Sub cmdExit_Click()
    Unload frmACR100
End Sub

Private Sub cmdSave_Click()
WriteToFile
ISADDING = False
ISEDITING = False
ButtonStatus
End Sub

Sub ButtonStatus()
cmdAddNew.Enabled = Not ISEDITING
cmdEdit.Enabled = Not ISEDITING And txtCMCNO <> ""
cmdSave.Enabled = ISEDITING ' And txtIMITN <> ""
cmdDelete.Enabled = Not ISEDITING 'And txtIMITN <> ""
cmdCancel.Enabled = ISEDITING
frameACR100.Enabled = ISEDITING
'txtIMITN.Locked = Not ISADDING ' Lock item code tru truong hop ISADDING=true
'txtDepartment.Enabled = ISEDITING
'cboDepartment.Visible = Not ISADDING
'txtDepartmentID.Visible = ISADDING
End Sub

Sub WriteToScreen()
If ISADDING Then
    txtCMCNO = ""
    txtCMNME = ""
    txtCMCTN = ""
    txtCMAD1 = ""
    txtCMAD2 = ""
    txtCMCIT = ""
    txtCMPSC = ""
    txtCMCNT = "Viet Nam"
    txtCMTEL = ""
    txtCMFAX = ""
    txtCMVID = ""
    txtCMCID = ""
    txtCNONM = ""
    cboCMCID = ""
    txtCMGCD = ""
    txtCMSNO = ""
    txtMMNME = ""
    cboCMSNO = ""
    txtCMCLM = ""
    chkCMCRS.value = 0
    txtCMPTC = ""
    txtPTDSC = ""
    txtCMTYP = ""
    txtCTDSC = ""
    txtCMSTN = ""
    txtCMVAT = ""
    cboCMVAT = ""
    txtCMARB = 0
    txtCMOEM = 0
    txtCMAIA = 0
    txtCMAPA = 0
    txtCMYSA = 0
    txtCMYPA = 0
    txtCMDLP = ""
    txtCMDLI = ""
Else
    Dim RecRCM As Recordset
    Set RecRCM = DBconn.Execute("Select * from RCM where CMCNO='" & cboCMCNO.BoundText & "'")
    With RecRCM
        txtCMCNO = !CMCNO
        txtCMNME = Find("RCM", "CMNME", " WHERE CMCNO='" & txtCMCNO & "'")
        txtCMCTN = IIf(IsNull(!CMCTN), "", !CMCTN)
        txtCMAD1 = IIf(IsNull(!CMAD1), "", !CMAD1)
        txtCMAD2 = IIf(IsNull(!CMAD2), "", !CMAD2)
        txtCMCIT = IIf(IsNull(!CMCIT), "", !CMCIT)
        txtCMPSC = IIf(IsNull(!CMPSC), "", !CMPSC)
        txtCMCNT = IIf(IsNull(!CMCNT), "", !CMCNT)
        txtCMTEL = IIf(IsNull(!CMTEL), "", !CMTEL)
        txtCMFAX = IIf(IsNull(!CMFAX), "", !CMFAX)
        txtCMVID = IIf(IsNull(!CMVID), "", !CMVID)
        txtCMCID = IIf(IsNull(!CMCID), "", !CMCID)
        txtCNONM = Find("ACN", "CNONM", " WHERE CNCID='" & txtCMCID & "'")
        cboCMCID = txtCNONM
        txtCMGCD = IIf(IsNull(!CMGCD), "", !CMGCD)
        txtCMSNO = IIf(IsNull(!CMSNO), "", !CMSNO)
        txtMMNME = Find("SMM", "MMNME", " WHERE MMSNO='" & txtCMSNO & "'")
        cboCMSNO = txtMMNME
        txtCMCLM = IIf(IsNull(!CMCLM), 0, !CMCLM)
        If IsNull(!CMCRS) Then
            chkCMCRS.value = 0
        Else
            chkCMCRS.value = IIf(!CMCRS, 1, 0)
        End If
        txtCMPTC = IIf(IsNull(!CMPTC), "", !CMPTC)
        txtPTDSC = Find("APT", "PTDSC", " WHERE PTPTC='" & txtCMPTC & "'")
        txtCMTYP = IIf(IsNull(!CMTYP), "", !CMTYP)
        txtCTDSC = Find("RCT", "CTDSC", " WHERE CTTYP='" & txtCMTYP & "'")
        txtCMSTN = IIf(IsNull(!CMSTN), "", !CMSTN)
        txtCMVAT = IIf(IsNull(!CMVAT), "", !CMVAT)
        cboCMVAT = Find("VVT", "VTDSC", " WHERE VTVTP='" & txtCMVAT & "'")
        txtCMARB = IIf(IsNull(!CMARB), 0, !CMARB)
        txtCMOEM = IIf(IsNull(!CMOEM), 0, !CMOEM)
        txtCMAIA = IIf(IsNull(!CMAIA), 0, !CMAIA)
        txtCMAPA = IIf(IsNull(!CMAPA), 0, !CMAPA)
        txtCMYSA = IIf(IsNull(!CMYSA), 0, !CMYSA)
        txtCMYPA = IIf(IsNull(!CMYPA), 0, !CMYPA)
        txtCMDLP = IIf(IsNull(!CMDLP), "", !CMDLP)
        txtCMDLI = IIf(IsNull(!CMDLI), "", !CMDLI)
    End With
End If


End Sub
Sub WriteToFile()
On Error GoTo acr100_err
If ISADDING Then
    SQL = "Insert into RCM(CMCNO,CMNME,CMCTN,CMAD1" & _
    ",CMAD2,CMCIT,CMPSC,CMCNT" & _
    ",CMTEL,CMFAX,CMVID,CMCID" & _
    ",CMGCD,CMSNO,CMCLM,CMCRS" & _
    ",CMPTC,CMSTN,CMVAT,CMTYP) values " & _
    "('" & txtCMCNO & "','" & txtCMNME & "','" & txtCMCTN & "','" & txtCMAD1 & _
    "','" & txtCMAD2 & "','" & txtCMCIT & "','" & txtCMPSC & "','" & txtCMCNT & _
    "','" & txtCMTEL & "','" & txtCMFAX & "','" & txtCMVID & "','" & txtCMCID & _
    "','" & txtCMGCD & "','" & txtCMSNO & "','" & txtCMCLM & "','" & chkCMCRS & _
    "','" & txtCMPTC & "','" & txtCMSTN & "','" & txtCMVAT & "','" & txtCMTYP & "')"
Else
    SQL = "UPDATE RCM SET CMCNO='" & txtCMCNO & "',CMNME='" & txtCMNME & "',CMCTN='" & txtCMCTN & "',CMAD1='" & txtCMAD1 & _
    "',CMAD2='" & txtCMAD2 & "',CMCIT='" & txtCMCIT & "',CMPSC='" & txtCMPSC & "',CMCNT='" & txtCMCNT & _
    "',CMTEL='" & txtCMTEL & "',CMFAX='" & txtCMFAX & "',CMVID='" & txtCMVID & "',CMCID='" & txtCMCID & _
    "',CMGCD='" & txtCMGCD & "',CMSNO='" & txtCMSNO & "',CMCLM='" & txtCMCLM & "',CMCRS='" & chkCMCRS & _
    "',CMPTC='" & txtCMPTC & "',CMSTN='" & txtCMSTN & "',CMVAT='" & txtCMVAT & "',CMTYP='" & txtCMTYP & "'" & _
    " WHERE CMCNO='" & cboCMCNO.BoundText & "'"
End If
DBconn.Execute SQL
Adodc1.RecordSource = "Select * from RCM"
Adodc1.Refresh
cboCMCNO.BoundText = txtCMCNO
acr100_next:
    Exit Sub
acr100_err:
    MsgBox Err.Description
    GoTo acr100_next
End Sub

Private Sub Form_Activate()
OpenFile
ButtonStatus
End Sub

Private Sub txtCMAD1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtCMAD2.SetFocus
End Sub

Private Sub txtCMAD2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtCMCNT.SetFocus
End Sub

Private Sub txtCMCID_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Dim Result As String
    
    Result = Find("ACN", "CNONM", " WHERE CNCID='" & txtCMCID & "'")
    If Result = "" Then
        cboCMCID.Visible = True
        cboCMCID.SetFocus
    Else
        txtCNONM = Result
        cboCMCID.Visible = False
        txtCMTYP.SetFocus
    End If
   
End If
End Sub

Private Sub txtCMCIT_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtCMPSC.SetFocus
End Sub

Private Sub txtCMCLM_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then chkCMCRS.SetFocus
End Sub

Private Sub txtCMCNO_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    If ValidMaso(OldCMCNO, txtCMCNO, "RCM", " CMCNO='" & txtCMCNO & "'") Then
        MsgBox "This code is already exist"
        txtCMCNO.SetFocus
    Else
        txtCMCID.SetFocus
    End If
    
End If
End Sub

Private Sub txtCMCNT_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtCMCIT.SetFocus
End Sub

Private Sub txtCMCTN_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtCMAD1.SetFocus
End Sub

Private Sub txtCMFAX_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtCMVID.SetFocus
End Sub

Private Sub txtCMGCD_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtCMVAT.SetFocus
End Sub

Private Sub txtCMNME_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtCMCTN.SetFocus
End Sub

Private Sub txtCMPSC_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtCMTEL.SetFocus
End Sub

Private Sub txtCMPTC_KeyPress(KeyAscii As Integer)
Dim Result As String
If KeyAscii = 13 Then
    Result = Find("APT", "PTDSC", " WHERE PTPTC='" & txtCMPTC & "'")
    If Result <> "" Then
        txtPTDSC = Result
        txtCMSTN.SetFocus
    Else
        cboCMPTC.Visible = True
        cboCMPTC.SetFocus
    End If
    
End If
End Sub

Private Sub txtCMSNO_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Dim Result As String
    Result = Find("SMM", "MMNME", " WHERE MMSNO='" & txtCMSNO & "'")
    If Result = "" Then
        cboCMSNO.Visible = True
        cboCMSNO.SetFocus
    Else
        txtMMNME = Result
        cboCMSNO.Visible = False
        'txtCMNME.SetFocus
    End If
End If
End Sub

Private Sub txtCMSTN_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtCMSNO.SetFocus
End Sub

Private Sub txtCMTEL_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtCMFAX.SetFocus
End Sub

Private Sub txtCMTYP_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Dim Result
    Result = Find("RCT", "CTDSC", " WHERE CTTYP='" & txtCMTYP & "'")
    If Result <> "" Then
        txtCTDSC = Result
        txtCMNME.SetFocus
    Else
        cboCMTYP.Visible = True
        cboCMTYP.SetFocus
    End If
    
End If
End Sub

Private Sub txtCMVAT_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
     Dim Result As String
    
    Result = Find("VVT", "VTDSC", " WHERE VTVTP='" & txtCMVAT & "'")
    If Result = "" Then
        cboCMVAT.Visible = True
        cboCMVAT.SetFocus
    Else
        txtVTDSC = Result
        cboCMVAT.Visible = False
        txtCMCLM.SetFocus
    End If
End If
End Sub

Private Sub txtCMVID_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtCMGCD.SetFocus
End Sub
Sub OpenFile()
Adodc1.ConnectionString = ConnectString
Adodc1.ConnectionTimeout = 10
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "Select * from RCM ORDER BY CMNME"
Adodc1.Refresh

Adodc2.ConnectionString = ConnectString
Adodc2.ConnectionTimeout = 10
Adodc2.CommandType = adCmdText
Adodc2.RecordSource = "Select * from ACN"
Adodc2.Refresh

'FieldDel = "IMRID"
'DelStatus = "IZ"
SQL = "Select * from SMM " 'where " & FieldDel & " <>'" & DelStatus & "' "
Adodc3.ConnectionString = ConnectString
Adodc3.ConnectionTimeout = 10
Adodc3.CommandType = adCmdText
Adodc3.RecordSource = SQL
Adodc3.Refresh

Adodc4.ConnectionString = ConnectString
Adodc4.ConnectionTimeout = 10
Adodc4.CommandType = adCmdText
Adodc4.RecordSource = "Select * From VVT"
Adodc4.Refresh

Adodc5.ConnectionString = ConnectString
Adodc5.ConnectionTimeout = 10
Adodc5.CommandType = adCmdText
Adodc5.RecordSource = "Select * From APT"
Adodc5.Refresh

Adodc6.ConnectionString = ConnectString
Adodc6.ConnectionTimeout = 10
Adodc6.CommandType = adCmdText
Adodc6.RecordSource = "Select * From RCT"
Adodc6.Refresh
End Sub
